load('res_incr.txt');
n = 801;
load('1000x1000.mat', 'A');
%A = zeros(801);
for i=1:length(res_incr)
  A(res_incr(i,1),res_incr(i,2)) = res_incr(i,3);
end;
save('1000x1000.mat', 'A');

% -2 --- not completed
% -1 --- accuracy 
%  0 --- timeout (15)


B = max(A, zeros(n));
B = log(B);
B = B.*(B~=-Inf);
B = B - min(min(B));
B = B / max(max(B));
B = B .* 64;
image(B);

 return;

pts2 = zeros(n*n, 2);
pts1 = zeros(n*n, 2);
pts0 = zeros(n*n, 2);
c2 = 0;
c1 = 0; 
c0 = 0;

for i=1:n
  for j=1:n
    if A(i, j) == -2
      c2 = c2+1;
      pts2(c2, :) = [i, j];
    elseif A(i,j) == -1
      c1 = c1+1;
      pts1(c1, :) = [i, j];
    elseif A(i,j) == 0
      c0 = c0+1;
      pts0(c0, :) = [i, j];
    end
  end
end

pts2(c2+1:end,:) = [];
pts1(c1+1:end,:) = [];
pts0(c0+1:end,:) = [];

